/*
 * robot.h
 *
 *  Created on: Sep 30, 2014
 *      Author: amorim
 */

#ifndef ROBOT_H_
#define ROBOT_H_

#include "serial.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

using namespace std;

class Robot;

enum ROBOT_CMD {
	MOVE_FWD,
	MOVE_BWD,
	LEFT_FWD,
	RIGHT_FWD,
	LEFT_BWD,
	RIGHT_BWD,
	STOP,
	HIGH_SPEED,
	LOW_SPEED,
	BEEP,
	CMD_CNT
};

class Robot {

	string commands[CMD_CNT];
	string device;
	int fd;
	SerialConnection connection;

public :
	Robot();
	int connect();

	void close();

	void init_cmd();

	void move(ROBOT_CMD cmd);
};

#endif /* ROBOT_H_ */
